<template>
  <!-- 雷达图  图表必须给高和宽度-->
  <div ref="aa" class="aaa" style="width: 12.5rem; height: 100%" />
</template>

<script>
// 完成加载过程
var echarts = require('echarts')
// import radar from './radar'
export default {
  mounted() {
    this.echarts = echarts.init(this.$refs.aa) // 得到图表实例
    this.echarts.setOption({
      tooltip: {
        trigger: 'axis'
      },
      legend: {
        left: 'center'
      },
      radar: [
        {
          indicator: [
            { text: '', max: 100 },
            { text: '项目技术', max: 100 },
            { text: '高阶技术', max: 100 },
            { text: '基础知识', max: 100 },
            { text: '理论基础', max: 100 }
          ],
          radius: 40,
          center: ['50%', '50%']
        }
      ],
      series: [
        {
          type: 'radar',
          tooltip: {
            trigger: 'item'
          },
          areaStyle: {},
          data: [
            {
              value: [80, 60, 70, 80, 60]
            }
          ]
        }
      ]
    })
  }

}
</script>
<style>
.aaa {
  margin: 0 auto;
}
</style>
